#include "header.h"
#include "rt.h"

SDL_Surface		*sdl_context(void)
{
	SDL_Surface	*window;

	if (SDL_Init(SDL_INIT_VIDEO) == -1)
		return ((SDL_Surface *)error_msg("SDL", "Invalid return from SDL initialisation", 0));
	if ((window = SDL_SetVideoMode(WIN_X, WIN_Y, 32, SDL_OPENGL)) == NULL)
		return ((SDL_Surface *)error_msg("SDL", "Invalid return from windows creation", 0));
	SDL_WM_SetCaption("GLSL Raytracer", NULL);
	return (window);
}